load("@fbcode_macros//build_defs:cpp_library.bzl", "cpp_library")

oncall("scm_client_infra")

cpp_library(
    name = "git",
    srcs = [
        "GitBlob.cpp",
        "GitTree.cpp",
    ],
    headers = [
        "GitBlob.h",
        "GitTree.h",
    ],
    deps = [
        "fbsource//third-party/fmt:fmt",
        "//eden/common/utils:throw",
        "//eden/fs/model:model",
        "//folly:conv",
    ],
    exported_deps = [
        "//eden/fs/model:model-fwd",
        "//folly:range",
        "//folly/io:iobuf",
    ],
)

cpp_library(
    name = "gitignore",
    srcs = [
        "GitIgnore.cpp",
        "GitIgnoreFileParser.cpp",
        "GitIgnorePattern.cpp",
        "GitIgnoreStack.cpp",
    ],
    headers = [
        "GitIgnore.h",
        "GitIgnoreFileParser.h",
        "GitIgnorePattern.h",
        "GitIgnoreStack.h",
        "TopLevelIgnores.h",
    ],
    deps = [
        "//eden/common/utils:system_error",
        "//folly:file",
        "//folly:file_util",
        "//folly/logging:logging",
    ],
    exported_deps = [
        "//eden/common/utils:path",
        "//eden/fs/utils:matcher",
        "//folly:expected",
        "//folly:range",
    ],
)
